<?php
class BaseModel{
    public static $config;
    protected $db;
    public function __construct(){
        if(self::$config==null){
         self::$config = Yaf_Application::app()->getConfig();
        }
        $this->db=Mysql::getInstance(self::$config->get('resources.database.mysql'));
    }
}